package niuke.meituan2021._2021_11_03;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author: Tangxz
 * @email: 1171702529@qq.com
 * @cate: 2021/11/03 08:28
 */
public class One {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();
        int [] scores = new int[n];
        int i =0;
        while(i<n){
            scores[i++] = sc.nextInt();
        }
        Arrays.sort(scores);
        if(2*y<n || 2*x>n){
            System.out.print("-1");
        }else{
            int right = n-x;
            int left = x;
            if(right>y){
                left+=right-y;
            }
            System.out.print(scores[left-1]);
        }

    }

}
